Skip to content

Delete cases example#248562

Merged
lcawl merged 8 commits intoelastic:mainfrom
lcawl:delete-cases-example
Jan 15, 2026
Merged

Delete cases example#248562
lcawl merged 8 commits intoelastic:mainfrom
lcawl:delete-cases-example

Conversation

@lcawl
Copy link
Copy Markdown
Contributor

@lcawl lcawl commented Jan 10, 2026

Summary

Relates to #244878

The curl example in https://www.elastic.co/docs/api/doc/kibana/operation/operation-deletecasedefaultspace is invalid:

curl \
 --request DELETE 'https://localhost:5601/api/cases?ids=d4e7abb0-b462-11ec-9a8d-698504725a43' \
 --header "Authorization: $API_KEY" \
 --header "kbn-xsrf: string"

In curl, the query parameter value must have URL-encoded square brackets and quotes.

This PR overrides the automatically-generated curl example with a custom code sample. It also adds some examples to the description so it's clearer how the query parameter syntax varies in curl and Console.

I've also fixed the following linting errors in the case APIs:

[26] bundled.yaml:1411:16 at #/components/parameters/user_action_types/example

Example value must conform to the schema: type must be array.

1409 |           - title
1410 |           - user
1411 |     example: create_case
1412 | schemas:
1413 |   assignees:

referenced from bundled.yaml:1388:7 at #/components/parameters/user_action_types 

Warning was generated by the no-invalid-parameter-examples rule.

...
[27] bundled.yaml:3059:15 at #/components/schemas/payload_create_case/properties/tags/items/example

Example value must conform to the schema: type must be string.

3057 |         type: string
3058 |         example:
3059 |           - tag-1
3060 |     title:
3061 |       type: string
3062 | payload_delete:

referenced from bundled.yaml:3057:13 at #/components/schemas/payload_create_case/properties/tags/items 

Warning was generated by the no-invalid-schema-examples rule.

...
[29] bundled.yaml:4061:24 at #/components/examples/find_case_activity_response/value/userActions/1/payload/comment

Example value must conform to the schema: `comment` property type must be object.

4059 | owner: cases
4060 | payload:
4061 |   comment: A new comment
4062 |   owner: cases
4063 |   type: user

referenced from bundled.yaml:1058:15 at #/paths/~1api~1cases~1{caseId}~1user_actions~1_find/get/responses/200/content/application~1json 
...
[31] bundled.yaml:4078:17 at #/components/examples/find_case_activity_response/value/userActions/2/payload/assignees

Example value must conform to the schema: `assignees` property type must be array.

4076 | payload:
4077 |   assignees:
4078 |     uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
4079 | version: WzM1ODg4LDFb
4080 | type: assignees

referenced from bundled.yaml:1058:15 at #/paths/~1api~1cases~1{caseId}~1user_actions~1_find/get/responses/200/content/application~1json 

Warning was generated by the no-invalid-media-type-examples rule.

Screenshots

The updated description and examples look like this in a Bump.sh preview:

image

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
    - [ ] Documentation was added for features that require explanation or tutorials
    - [ ] Unit or functional tests were updated or added to match the most common scenarios
    - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
    - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
    - [ ] Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

N/A

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@lcawl lcawl added docs Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.3.0 v9.4.0 v9.2.5 v8.19.10 labels Jan 10, 2026
@lcawl lcawl marked this pull request as ready for review January 10, 2026 00:41
@lcawl lcawl requested review from a team as code owners January 10, 2026 00:41
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-cases (Feature:Cases)

@lcawl lcawl requested a review from janmonschke January 10, 2026 02:25
Copy link
Copy Markdown
Contributor

@janmonschke janmonschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @lcawl 🎉

@lcawl lcawl enabled auto-merge (squash) January 15, 2026 15:55
@lcawl lcawl merged commit 0758c3b into elastic:main Jan 15, 2026
13 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/21040841794

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #40 / Dataset Quality Dataset Quality Details failed docs should go to discover for failed docs when the button next to breakdown selector is clicked
  • [job] [logs] FTR Configs #72 / discover/esql discover esql controls when adding an ES|QL panel with controls in dashboards and exploring it in discover should retain the controls and their state

Metrics [docs]

✅ unchanged

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 15, 2026
(cherry picked from commit 0758c3b)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 15, 2026
(cherry picked from commit 0758c3b)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts
9.2
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 248562

Questions ?

Please refer to the Backport tool documentation

@lcawl lcawl deleted the delete-cases-example branch January 15, 2026 18:36
kibanamachine added a commit that referenced this pull request Jan 15, 2026
# Backport

This will backport the following commits from `main` to `9.2`:
- [Delete cases example
(#248562)](#248562)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2026-01-15T17:47:17Z","message":"Delete
cases example
(#248562)","sha":"0758c3bdf1c7398becb2cf8e110c5b00cf4e11c6","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","docs","Feature:Cases","backport:version","v9.3.0","v9.4.0","v8.19.10","v9.2.5"],"title":"Delete
cases
example","number":248562,"url":"https://github.com/elastic/kibana/pull/248562","mergeCommit":{"message":"Delete
cases example
(#248562)","sha":"0758c3bdf1c7398becb2cf8e110c5b00cf4e11c6"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","8.19","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/248562","number":248562,"mergeCommit":{"message":"Delete
cases example
(#248562)","sha":"0758c3bdf1c7398becb2cf8e110c5b00cf4e11c6"}},{"branch":"8.19","label":"v8.19.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jan 19, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @lcawl

kibanamachine added a commit that referenced this pull request Jan 19, 2026
# Backport

This will backport the following commits from `main` to `9.3`:
- [Delete cases example
(#248562)](#248562)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2026-01-15T17:47:17Z","message":"Delete
cases example
(#248562)","sha":"0758c3bdf1c7398becb2cf8e110c5b00cf4e11c6","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","docs","Feature:Cases","backport:version","v9.3.0","v9.4.0","v8.19.10","v9.2.5"],"title":"Delete
cases
example","number":248562,"url":"https://github.com/elastic/kibana/pull/248562","mergeCommit":{"message":"Delete
cases example
(#248562)","sha":"0758c3bdf1c7398becb2cf8e110c5b00cf4e11c6"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","8.19","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/248562","number":248562,"mergeCommit":{"message":"Delete
cases example
(#248562)","sha":"0758c3bdf1c7398becb2cf8e110c5b00cf4e11c6"}},{"branch":"8.19","label":"v8.19.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels docs Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes v8.19.10 v9.2.5 v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants